package com.ning.ems.entity;

import com.ning.ems.enums.UserType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.stereotype.Repository;

import java.io.Serializable;

/**
 * @author Ning 242741154@qq.com
 * @date 2020/2/29 16:05
 */
@Data
@Repository
@ApiModel("Entity-User")
public class User implements Serializable {
    @ApiModelProperty("Primary Key And The Account Number")
    private Integer id;

    @ApiModelProperty("user name")
    private String name;

    /**
     * Password
     * <p>
     * Encryption by MD5 algorithm
     */
    @ApiModelProperty("password")
    private String password;

    @ApiModelProperty("mobile number")
    private String mobileNumber;

    /**
     * User type default 3(CUSTOMER)
     * <p>
     * Get the describe by invoke :
     * {@link UserType#descOf(int)
     * UserType.descOf(int)}
     */
    @ApiModelProperty("user type")
    private Integer type = 3;
}
